namespace ext
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>
	/// A specialized SplitButton that contains a menu of {@link Ext.menu.CheckItem} elements. The button automatically
	/// cycles through each menu item on click, raising the button&apos;s {@link #change} event (or calling the button&apos;s
	/// {@link #changeHandler} function, if supplied) for the active menu item. Clicking on the arrow section of the
	/// button displays the dropdown menu just like a normal SplitButton. Example usage:
	/// 
	/// var btn = new Ext.CycleButton({
	/// showText: true,
	/// prependText: &apos;View as &apos;,
	/// items: [{
	/// text:&apos;text only&apos;,
	/// iconCls:&apos;view-text&apos;,
	/// checked:true
	/// },{
	/// text:&apos;HTML&apos;,
	/// iconCls:&apos;view-html&apos;
	/// }],
	/// changeHandler:function(btn, item){
	/// Ext.Msg.alert(&apos;Change View&apos;, item.text);
	/// }
	/// });
	/// </summary>
	/// <htmlSummary>
	/// A specialized SplitButton that contains a menu of {@link Ext.menu.CheckItem} elements. The button automatically
	/// cycles through each menu item on click, raising the button&apos;s {@link #change} event (or calling the button&apos;s
	/// {@link #changeHandler} function, if supplied) for the active menu item. Clicking on the arrow section of the
	/// button displays the dropdown menu just like a normal SplitButton. Example usage:
	/// &lt;pre&gt;&lt;code&gt;
	/// var btn = new Ext.CycleButton({
	/// showText: true,
	/// prependText: &apos;View as &apos;,
	/// items: [{
	/// text:&apos;text only&apos;,
	/// iconCls:&apos;view-text&apos;,
	/// checked:true
	/// },{
	/// text:&apos;HTML&apos;,
	/// iconCls:&apos;view-html&apos;
	/// }],
	/// changeHandler:function(btn, item){
	/// Ext.Msg.alert(&apos;Change View&apos;, item.text);
	/// }
	/// });
	/// &lt;/code&gt;&lt;/pre&gt;
	/// </htmlSummary>
	/// <definedin>src\widgets\CycleButton.js</definedin>
	[ScriptName("CycleButton")]
	[ScriptNamespace("Ext")]
	[Imported()]
	public partial class CycleButton : ext.SplitButton
	{
		
		#region Constructors
		/// <summary>Constructor</summary>
		/// <param name="config">The config object</param>
		public CycleButton(ext.CycleButton_Configuration config)
		{
		}
		
		/// <summary>Constructor</summary>
		public CycleButton()
		{
		}
		#endregion
		
		#region Fields
		/// <summary>
		/// An array of {@link Ext.menu.CheckItem} config objects to be used when creating the
		/// button&apos;s menu items (e.g., {text:&apos;Foo&apos;, iconCls:&apos;foo-icon&apos;})
		/// </summary>
		/// <htmlSummary>
		/// An array of {@link Ext.menu.CheckItem} &lt;b&gt;config&lt;/b&gt; objects to be used when creating the
		/// button&apos;s menu items (e.g., {text:&apos;Foo&apos;, iconCls:&apos;foo-icon&apos;})
		/// </htmlSummary>
		/// <definedin>src\widgets\CycleButton.js</definedin>
		[ScriptName("items")]
		public System.Array Items;
		
		/// <summary>True to display the active item&apos;s text as the button text (defaults to false)</summary>
		/// <definedin>src\widgets\CycleButton.js</definedin>
		[ScriptName("showText")]
		public bool ShowText;
		
		/// <summary>
		/// A static string to prepend before the active item&apos;s text when displayed as the
		/// button&apos;s text (only applies when showText = true, defaults to &apos;&apos;)
		/// </summary>
		/// <definedin>src\widgets\CycleButton.js</definedin>
		[ScriptName("prependText")]
		public string PrependText;
		
		/// <summary>
		/// A callback function that will be invoked each time the active menu
		/// item in the button&apos;s menu has changed. If this callback is not supplied, the SplitButton will instead
		/// fire the {@link #change} event on active item change. The changeHandler function will be called with the
		/// following argument list: (SplitButton this, Ext.menu.CheckItem item)
		/// </summary>
		/// <definedin>src\widgets\CycleButton.js</definedin>
		[ScriptName("changeHandler")]
		public System.Delegate ChangeHandler;
		
		/// <summary>
		/// A css class which sets an image to be used as the static icon for this button. This
		/// icon will always be displayed regardless of which item is selected in the dropdown list. This overrides the
		/// default behavior of changing the button&apos;s icon to match the selected item&apos;s icon on change.
		/// </summary>
		/// <definedin>src\widgets\CycleButton.js</definedin>
		[ScriptName("forceIcon")]
		public string ForceIcon;
		
		/// <summary>
		/// Fires after the button&apos;s active menu item has changed. Note that if a {@link #changeHandler} function
		/// is set on this CycleButton, it will be called instead on active item change and this change event will
		/// not be fired.
		/// </summary>
		/// <definedin>src\widgets\CycleButton.js</definedin>
		[ScriptName("changeEventName")]
		public const string ChangeEventName = "change";
		#endregion
		
		#region Properties
		/// <summary>The {@link Ext.menu.Menu Menu} object used to display the {@link Ext.menu.CheckItem CheckItems} representing the available choices.</summary>
		/// <definedin>src\widgets\CycleButton.js</definedin>
		[ScriptName("menu")]
		[IntrinsicProperty()]
		public ext.menu.Menu Menu
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
			set
			{
			}
		}
		#endregion
		
		#region Methods
		/// <summary>Sets the button&apos;s active menu item.</summary>
		/// <definedin>src\widgets\CycleButton.js</definedin>
		/// <param name="item">The item to activate</param>
		/// <param name="suppressEvent">True to prevent the button&apos;s change event from firing (defaults to false)</param>
		[ScriptName("setActiveItem")]
		public void SetActiveItem(ext.menu.CheckItem item, bool suppressEvent)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Gets the currently active menu item.</summary>
		/// <definedin>src\widgets\CycleButton.js</definedin>
		/// <returns>The active item</returns>
		[ScriptName("getActiveItem")]
		public ext.menu.CheckItem GetActiveItem()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// This is normally called internally on button click, but can be called externally to advance the button&apos;s
		/// active item programmatically to the next one in the menu. If the current item is the last one in the menu
		/// the active item will be set to the first item in the menu.
		/// </summary>
		/// <definedin>src\widgets\CycleButton.js</definedin>
		[ScriptName("toggleSelected")]
		public void ToggleSelected()
		{
			throw new System.Exception("Imported - not implemented");
		}
		#endregion
		
		#region Events
		/// <summary>
		/// Fires after the button&apos;s active menu item has changed. Note that if a {@link #changeHandler} function
		/// is set on this CycleButton, it will be called instead on active item change and this change event will
		/// not be fired.
		/// </summary>
		/// <definedin>src\widgets\CycleButton.js</definedin>
		[ScriptName("change")]
		public event ext.auto.Delegate_ext_CycleButton_And_ext_menu_CheckItem Change;
		#endregion
	}
}
